package com.feng.mvc.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
public class PathVariableController {
//    @RequestMapping("/pathvariable/{id}")
    @RequestMapping("/pathvariable/{id}/{username}")
    public String TestPathVarivable(@PathVariable("id")Integer id,@PathVariable("username")String name){
        System.out.println("id: "+id+"\nname: "+name);
        return "pathvariable";
    }
}
